package com.shrcl.engineerprocess.domain.impl;

import com.shrcl.engineerprocess.domain.CertificationAgencyCode;
import com.shrcl.engineerprocess.domain.proxy.CertificationAgencyCodeProxy;
import edu.fudan.langlab.domain.code.impl.CodeImpl;
import edu.fudan.mylang.pf.IObjectFactory;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@Entity
@DiscriminatorValue("CERTIFICATIONAGENCYCODE_TYPE")
public class CertificationAgencyCodeImpl extends CodeImpl implements CertificationAgencyCode {
  public CertificationAgencyCodeImpl() {
    super();
  }
  
  public static CertificationAgencyCode create(final IObjectFactory objectFactory) {
    com.shrcl.engineerprocess.domain.CertificationAgencyCode certificationAgencyCode = new com.shrcl.engineerprocess.domain.impl.CertificationAgencyCodeImpl(
    );
    objectFactory.create(certificationAgencyCode);
    return certificationAgencyCode;			
    
  }
  
  public static CertificationAgencyCode createCertificationAgencyCodeImpl(final IObjectFactory objectFactory, final Procedure1<CertificationAgencyCode> init) {
    com.shrcl.engineerprocess.domain.CertificationAgencyCode certificationAgencyCode = new com.shrcl.engineerprocess.domain.impl.CertificationAgencyCodeImpl(
    );
    objectFactory.create(certificationAgencyCode);
    init.apply(certificationAgencyCode);
    
    return certificationAgencyCode;			
    
  }
  
  public CertificationAgencyCodeProxy toProxy() {
    com.shrcl.engineerprocess.domain.proxy.CertificationAgencyCodeProxy proxy = new com.shrcl.engineerprocess.domain.proxy.CertificationAgencyCodeProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
